<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td><H2><font color="#336699" class="PageHeader">Using Clearcase and Grid Engine</font></H2></td>
</tr>
</table>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td>

<br><br>

<P CLASS="text-body-indent" ALIGN=JUSTIFY STYLE="margin-left: 0in">In
order to run remote jobs with Clearcase, it is necessary to invoke a
special wrapper script which runs prior to the job. This script sets
the appropriate view and will work for qrsh, qsub, qmake and qtcsh.
First, create the wrapper script. For example:</P>
<PRE STYLE="margin-right: 0.79in; text-align: justify">---------------
#!/bin/sh
 if [ x_$CLEARCASE_ROOT = x_ ]; then
     /bin/sh -c &quot;$*&quot;
 else
# set the path to cleartool to the exact path for your site
     /usr/atria/bin/cleartool setview -exec &quot;cd $SGE_O_WORKDIR;$*&quot; \
         `basename $CLEARCASE_ROOT`
 fi
---------------
        QRSH_WRAPPER=/cc_wrapper</PRE><P STYLE="margin-bottom: 0in">
Then, to run a clearcase job: 
</P>
<P STYLE="margin-bottom: 0in"> - Set your clearcase view. 
</P>
<P STYLE="margin-bottom: 0in"> - cd to your work directory if
necessary 
</P>
<P STYLE="margin-bottom: 0in"> - Run your job with qrsh with the
following switch added: 
</P>
<P STYLE="margin-bottom: 0in"><BR>
</P>
<PRE STYLE="margin-left: 0.79in; margin-right: 0.79in; margin-bottom: 0.2in; text-align: justify">     -v CLEARCASE_ROOT</PRE><P STYLE="margin-bottom: 0in">
This passes the CLEARCASE_ROOT variable to Grid Engine. Another
method is to use qsub. This is desirable if there are many jobs that
need to be run. In this case, QRSH_WRAPPER does not need to be set. 
</P>
<P STYLE="margin-bottom: 0in"><BR>
</P>
<PRE STYLE="margin-left: 0.79in; margin-right: 0.79in; margin-bottom: 0.2in; text-align: justify">   qsub -v CLEARCASE_ROOT  </PRE><P STYLE="margin-bottom: 0in">
In this case, the cc_wrapper script is being submitted as a job
script and the job arguments are being used as a vehicle to transfer
the command. 
</table>
</P>